From: Florian Müllner Date: Thu, 25 Jul 2019 14:21:46 +0000 (+0200) Subject: environment: Add convenience method for adjustment transitions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~38 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8ac2086ed1b2284666f59c2c26f15fd620ce1ac5;p=gnome-shell.git environment: Add convenience method for adjustment transitions By now, Tweener is used exclusively to animate changes to the StAdjustment:value property. But not for long, as now that we implement the same transition API as Clutter.Actor, we can re-use the existing convenience method for property transitions for adjustment changes as well. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669 --- diff --git a/js/ui/environment.js b/js/ui/environment.js index f2944a5c1..60d73d9cc 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -220,6 +220,11 @@ function init() { Clutter.Actor.prototype.ease_property = function(propName, target, params) { _easeActorProperty(this, propName, target, params); }; + St.Adjustment.prototype.ease = function(target, params) { + // we're not an actor of course, but we implement the same + // transition API as Clutter.Actor, so this works anyway + _easeActorProperty(this, 'value', target, params); + }; Clutter.Actor.prototype.toString = function() { return St.describe_actor(this);